<?php
class ActController extends Controller
{
	public $layout = '//layouts/column1';
    public $title_menu = 'Operation';
 public function filters() {
        return array(
            'accessControl', // perform access control for CRUD operations
            'postOnly + delete', // we only allow deletion via POST request
        );
    }
 public function accessRules() {
        return array(
            array('allow', // allow all users to perform 'index' and 'view' actions
                'actions' => array('index'),
                'users' => array('@'),
                ),
			array('deny',  // deny all users
				'users'=>array('*'),
			),
        );
    }
#---------------------------------------------------------------------------------------------------------------------------Index
    public function actionIndex() {
        // kondisi defaulnya adalah parent_id 
        $condition = "parent_id = 2";
	    $dataProvider = new CActiveDataProvider('TrMAction', array(
            'criteria' => array('condition' => $condition),
            'pagination' => array('pageSize' => 48,),
            'sort' => array(
                'defaultOrder' => 't.sort ASC, id ASC',
            ),
        ));
        $this->render('index', array(
            'dataProvider' => $dataProvider,
        ));
	}#---*End_actionLayanan
#---------------------------------------------------------------------------------------------------------------------------	

}